package pl.vm.domain;

public class Statistics implements Cloneable {

	private boolean startFromBegining = true;
	private boolean mvp = false;
	private int playedSets;
	private int attackPoints;
	private int blockPoints;
	private int servePoints;
	private int positiveReception;
	private int excelentReception;
	private int attackPercentage;
	private int numberOfReception;
	private int numberOfAttacks;
	private int blockedAttacks;
	private int lostPointInReception;
	private Score score;
	private int teamPositiveReception;
	private int teamAttackPercentage;
	private int opponentTeamAttackPercentage;

	public void reset() {
		this.startFromBegining = true;
		this.playedSets = 0;
		this.attackPoints = 0;
		this.blockPoints = 0;
		this.servePoints = 0;
		this.positiveReception = 0;
		this.excelentReception = 0;
		this.attackPercentage = 0;
		this.numberOfAttacks = 0;
		this.blockedAttacks = 0;
		this.lostPointInReception = 0;
		this.score = Score._3_0;
		this.teamAttackPercentage = 0;
		this.teamAttackPercentage = 0;
		this.opponentTeamAttackPercentage = 0;
	}

	public boolean isStartFromBegining() {
		return startFromBegining;
	}

	public int getPlayedSets() {
		return playedSets;
	}

	public int getAttackPoints() {
		return attackPoints;
	}

	public int getBlockPoints() {
		return blockPoints;
	}

	public int getServePoints() {
		return servePoints;
	}

	public int getPositiveReception() {
		return positiveReception;
	}

	public int getExcelentReception() {
		return excelentReception;
	}

	public int getAttackPercentage() {
		return attackPercentage;
	}

	public int getNumberOfReception() {
		return numberOfReception;
	}

	public int getNumberOfAttacks() {
		return numberOfAttacks;
	}

	public int getBlockedAttacks() {
		return blockedAttacks;
	}

	public int getLostPointInReception() {
		return lostPointInReception;
	}

	public Score getScore() {
		return score;
	}

	public int getTeamPositiveReception() {
		return teamPositiveReception;
	}

	public int getTeamAttackPercentage() {
		return teamAttackPercentage;
	}

	public int getOpponentTeamAttackPercentage() {
		return opponentTeamAttackPercentage;
	}

	public void setStartFromBegining(boolean startFromBegining) {
		this.startFromBegining = startFromBegining;
	}

	public void setPlayedSets(int playedSets) {
		this.playedSets = playedSets;
	}

	public void setAttackPoints(int attackPoints) {
		this.attackPoints = attackPoints;
	}

	public void setBlockPoints(int blockPoints) {
		this.blockPoints = blockPoints;
	}

	public void setServePoints(int servePoints) {
		this.servePoints = servePoints;
	}

	public void setPositiveReception(int positiveReception) {
		this.positiveReception = positiveReception;
	}

	public void setExcelentReception(int excelentReception) {
		this.excelentReception = excelentReception;
	}

	public void setAttackPercentage(int attackPercentage) {
		this.attackPercentage = attackPercentage;
	}

	public void setNumberOfReception(int numberOfReception) {
		this.numberOfReception = numberOfReception;
	}

	public void setNumberOfAttacks(int numberOfAttacks) {
		this.numberOfAttacks = numberOfAttacks;
	}

	public void setBlockedAttacks(int blockedAttacks) {
		this.blockedAttacks = blockedAttacks;
	}

	public void setLostPointInReception(int lostPointInReception) {
		this.lostPointInReception = lostPointInReception;
	}

	public void setScore(Score score) {
		this.score = score;
	}

	public void setTeamPositiveReception(int teamPositiveReception) {
		this.teamPositiveReception = teamPositiveReception;
	}

	public void setTeamAttackPercentage(int teamAttackPercentage) {
		this.teamAttackPercentage = teamAttackPercentage;
	}

	public void setOpponentTeamAttackPercentage(int opponentTeamAttackPercentage) {
		this.opponentTeamAttackPercentage = opponentTeamAttackPercentage;
	}

	public boolean isMvp() {
		return mvp;
	}

	public void setMvp(boolean mvp) {
		this.mvp = mvp;
	}

	@Override
	public Object clone() throws CloneNotSupportedException {
		return super.clone();
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + attackPercentage;
		result = prime * result + attackPoints;
		result = prime * result + blockPoints;
		result = prime * result + blockedAttacks;
		result = prime * result + excelentReception;
		result = prime * result + lostPointInReception;
		result = prime * result + (mvp ? 1231 : 1237);
		result = prime * result + numberOfAttacks;
		result = prime * result + numberOfReception;
		result = prime * result + opponentTeamAttackPercentage;
		result = prime * result + playedSets;
		result = prime * result + positiveReception;
		result = prime * result + ((score == null) ? 0 : score.hashCode());
		result = prime * result + servePoints;
		result = prime * result + (startFromBegining ? 1231 : 1237);
		result = prime * result + teamAttackPercentage;
		result = prime * result + teamPositiveReception;
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj) {
			return true;
		}
		if (obj == null) {
			return false;
		}
		if (getClass() != obj.getClass()) {
			return false;
		}
		Statistics other = (Statistics) obj;
		if (attackPercentage != other.attackPercentage) {
			return false;
		}
		if (attackPoints != other.attackPoints) {
			return false;
		}
		if (blockPoints != other.blockPoints) {
			return false;
		}
		if (blockedAttacks != other.blockedAttacks) {
			return false;
		}
		if (excelentReception != other.excelentReception) {
			return false;
		}
		if (lostPointInReception != other.lostPointInReception) {
			return false;
		}
		if (mvp != other.mvp) {
			return false;
		}
		if (numberOfAttacks != other.numberOfAttacks) {
			return false;
		}
		if (numberOfReception != other.numberOfReception) {
			return false;
		}
		if (opponentTeamAttackPercentage != other.opponentTeamAttackPercentage) {
			return false;
		}
		if (playedSets != other.playedSets) {
			return false;
		}
		if (positiveReception != other.positiveReception) {
			return false;
		}
		if (score != other.score) {
			return false;
		}
		if (servePoints != other.servePoints) {
			return false;
		}
		if (startFromBegining != other.startFromBegining) {
			return false;
		}
		if (teamAttackPercentage != other.teamAttackPercentage) {
			return false;
		}
		if (teamPositiveReception != other.teamPositiveReception) {
			return false;
		}
		return true;
	}
}
